home *** CD-ROM | disk | FTP | other *** search
/ NeXT Enterprise Objects Framework 1.1 / NeXT Enterprise Objects Framework 1.1.iso / NextDeveloper / Headers / eointerface / NXEditableFormatter.h < prev    next >
Encoding:
Text File  |  1994-05-14  |  2.5 KB  |  92 lines

  1. /*
  2. **      NXEditableFormatter.h
  3. **      Copyright (c) 1992, NeXT Computer, Inc.  All rights reserved. 
  4. */
  5.  
  6. #import "NXFormatter.h"
  7. #import "NXTableProtocols.h"
  8.  
  9. #import <objc/Object.h>
  10. #import <appkit/appkit.h>
  11.  
  12.  
  13. // NXEditableFormatter is functionally identical to the Database Kit's
  14. // DBEditableFormatter. Please refer to the DatabaseKit documentation for use
  15. // of this class.
  16.  
  17.  
  18. @interface NXEditableFormatter : NXFormatter
  19. {
  20. @private
  21.     unsigned int    _efReserved[2];
  22.  
  23.     id        rowAttrs;
  24.     id        columnAttrs;
  25.     int        editRow;
  26.     int        editColumn;
  27.  
  28.     /* NB: we don't have to swap these because they're not archived... */
  29.     BOOL        isEditing:1,    /* is column handling a cell edit? */
  30.             isModified:1,    /* is cell known to be modified? */
  31.             useRowPos:1,    /* use row position or identifier */
  32.             useColumnPos:1,    /* ditto for columns */
  33.             delWill1:1,    /* methods delegate responds to */
  34.             delWill2:1,
  35.             delDid:1,
  36.             delWillStatic1:1,
  37.             delWillStatic2:1,
  38.             delDidStatic:1;
  39.  
  40. @protected
  41.     id        font;        /* font with which to draw */
  42.     id        editView;    /* view we're currently editing in */
  43.     id        drawCell;    /* one cell for drawing */
  44. }
  45.  
  46.  
  47. - init;
  48. - free;
  49.  
  50. - font;
  51. - setFont:aFont;
  52.  
  53. - setDelegate:newDelegate;
  54.  
  55. - drawFieldAt:(unsigned int) row :(unsigned int) column
  56.     inside:(NXRect *) frame inView:view
  57.     withAttributes:(id <NXTableVectors>) rowAttrs
  58.               :(id <NXTableVectors>) columnAttrs
  59.     usePositions:(BOOL) useRowPos :(BOOL) useColumnPos;
  60.  
  61. - (BOOL) editFieldAt:(unsigned int) row :(unsigned int) column
  62.     inside:(NXRect *) frame inView:view
  63.     withAttributes:(id <NXTableVectors>) rowAttributes
  64.               :(id <NXTableVectors>) columnAttributes
  65.     usePositions:(BOOL) useRowPos :(BOOL) useColumnPos
  66.     onEvent:(NXEvent *) theEvent;
  67.  
  68. - abortEditing;
  69. - (BOOL) endEditing;
  70.  
  71. - write:(NXTypedStream *) stream;
  72. - read:(NXTypedStream *) stream;
  73.  
  74. @end
  75.  
  76.  
  77. @interface Object(NXFormatterValidation)
  78. - (BOOL) formatterWillChangeValueFor:identifier at:(unsigned int) position sender:sender;
  79. - (BOOL) formatterWillChangeValueFor:identifier at:(unsigned int) position to:aValue sender:sender;
  80. - formatterDidChangeValueFor:identifier at:(unsigned int) position to:aValue sender:sender;
  81.  
  82. - (BOOL) formatterWillChangeValueFor:rowIdentifier :columnIdentifier sender:sender;
  83. - (BOOL) formatterWillChangeValueFor:rowIdentifier :columnIdentifier to:aValue sender:sender;
  84. - formatterDidChangeValueFor:rowIdentifier :columnIdentifier to:aValue sender:sender;
  85. @end
  86.  
  87.  
  88. @protocol NXFormatterViewEditing
  89. - (BOOL) formatterDidEndEditing:sender endChar:(unsigned short)whyEnd;
  90. @end
  91.  
  92.